package com.cqhfan.pojo.user.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cqhfan.core.enums.SexTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@TableName("`user`")
public class User {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    private String nickName;

    private String userName;

    private String password;

    private String salt;

    private String phone;

    private String avatar;

    // 背景图片
    private String backgroundUrl;

    private Long douyinNumber;

    private String address;

    private String description;

    private SexTypeEnum sex;

    // 出生日期
    private Date birthday;

    private Boolean status;

    // 是否是私密
    private Boolean ifPrivate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
